<?php
class Zendvn_Panigator{
	
	public static function create($arrPanigator,$totalItems){
		
		$adapter = new Zend_Paginator_Adapter_Null($totalItems);
		
		$panigator = new Zend_Paginator($adapter);
		
		$panigator->setItemCountPerPage($arrPanigator['rowCount']);
		
		$panigator->setPageRange($arrPanigator['pageRange']);

		$panigator->setCurrentPageNumber($arrPanigator['page']);
		
		return $panigator;		
	}
}